import React from 'react';
import { Breadcrumb } from 'antd';
import { inject, observer } from 'mobx-react'
import { withRouter } from 'react-router-dom'
import './index.scss';

const BreadcrumbBox = (props) => {
  const { list } = props
  const { logoTitle } = props.store
  return (
    <div className='breadcrumb-box'>
      <Breadcrumb>
        <Breadcrumb.Item>{ logoTitle }</Breadcrumb.Item>
        {
          list.map((item, i) => (
            <Breadcrumb.Item key={i}>
              {item}
            </Breadcrumb.Item>
          ))
        }
      </Breadcrumb>
    </div>
  );
}

export default withRouter(inject('store')(observer(BreadcrumbBox)));

